package com.qn;

import com.alibaba.fastjson.JSON;
import com.only4play.order.commons.pipeline.Pipeline;
import com.qn.pipeline.context.InstanceBuildContext;
import com.qn.pipeline3.handler.InputDataPreCheckerHandler;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

@SpringBootTest
@Slf4j
class Pipeline3 {

    @Resource
    private InputDataPreCheckerHandler inputDataPreCheckerHandler;

    @Test
    public void test_AuthLink() {
        Map<String, Object> formInput = new HashMap<>();
        formInput.put("instanceName", "123456");
        InstanceBuildContext data = new InstanceBuildContext();
        data.setFormInput(formInput);

        Pipeline<InstanceBuildContext, Boolean> pipeline = new Pipeline<>(inputDataPreCheckerHandler);

        log.info(JSON.toJSONString(data));
    }
}
